#!/usr/bin/python

import common

common.setupEnv(globals())

usage = "Add Buy/Sell transactions"

parser = common.StockieOptionParser(usage=usage)
parser.add_posarg('stocksym', dest='symbol')
parser.add_posarg('type', dest='tr_type', type="choice", choices=("buy", "sell"))
parser.add_posarg('quantity', dest='quantity')
parser.add_posarg('price', dest='price')
(options, args) = parser.parse_args()

interface.addTransaction(options.symbol, options.tr_type, options.quantity, options.price)
